#include <iostream>
using namespace std;

double af(const double a, const double b) noexcept{
    double result = a + b;
    cout << "result的地址是:" << &result << endl;
    return result;
}

int main(int argc, char const *argv[])
{
    
    double a = 12.3;
    double b = 5;
    // 字面量可以作为右值引用
    double &&tc = 21.5;
    // 运算结果可以作为右值引用
    double &&td = a + b;
    // 方法的返回值可以作为右值引用
    double &&te = af(12.3, 3.7);

    cout << "tc value and address: " << tc << " , " << &tc << endl;
    cout << "td value and address: " << td << " ,  " << &td << endl;
    cout << "te value and address: " << te << " ,  " << &te << endl;
    return 0;
}
